
package rendi456.net;

import java.io.IOException;

public class Test
{
	public static final int PORT = 3575;

	public static void main(String[] args)
	{
		Server server = null;
		Client c1 = null;
		Client c2 = null;
		Client c3 = null;

		try
		{
			server = new Server(PORT);
		}
		catch (IOException e2)
		{
		}

		server.listen();

		try
		{
			c1 = new Client("David");
			c1.connect();
		}
		catch (IOException e1)
		{
		}

		try
		{
			c2 = new Client("Nic");
			c2.connect();
		}
		catch (IOException e1)
		{
		}

		c1.feed("Bonjour");

		c1.feed("ca va?");

		c2.feed("oui");

		try
		{
			c3 = new Client("Lepage");
			c3.connect();
		}
		catch (IOException e1)
		{
		}

		c3.feed("YO!");

	}

	public static String getThreadName()
	{
		return "@" + Thread.currentThread().getId();
	}
}
